﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using TestServiceConsole.SdService;

namespace TestServiceConsole
{
    class Program
    {
        static void Main(string[] args)
        {
            SdService.WcfServiceClient client = new SdService.WcfServiceClient();

            client.ClientCredentials.Windows.AllowedImpersonationLevel = System.Security.Principal.TokenImpersonationLevel.Impersonation;

            client.ChannelFactory.Credentials.Windows.ClientCredential = System.Net.CredentialCache.DefaultNetworkCredentials;


            //NetworkCredential credential = CredentialCache.DefaultCredentials;

            //client.ClientCredentials = credential;


            ConferenceSessionLite[] sessions = client.GetAgendaForDay(new DateTime(2012, 06, 20));

            foreach (ConferenceSessionLite session in sessions)
            {
                Console.WriteLine(session.Title);
            }


            Console.ReadLine();


        }
    }
}
